﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFramework.Configuration
{
    public interface IConfigSource
    {
        /// <summary>
        /// 获取配置。
        /// </summary>
        /// <typeparam name="T">配置类型。</typeparam>
        /// <returns></returns>
        T GetConfig<T>() where T : class, new();

        /// <summary>
        /// 获取配置。
        /// </summary>
        /// <typeparam name="T">配置类型。</typeparam>
        /// <returns></returns>
        T GetConfig<T>(string filePath) where T : class, new();

        /// <summary>
        /// 获取配置。
        /// </summary>
        /// <typeparam name="T">配置类型。</typeparam>
        /// <param name="getParameter">获取配置参数。</param>
        /// <returns>配置。</returns>
        T GetConfig<T>(IConfigParameter getParameter) where T : class, new();
    }
}
